<template>
  <div class="loading-tip">
    <span class="loading-text">加载中</span>
    <div class="dots">
      <span class="dot dot-1">•</span>
      <span class="dot dot-2">•</span>
      <span class="dot dot-3">•</span>
    </div>
  </div>
</template>

<script setup>
// 无需额外的逻辑，纯CSS动画实现
</script>

<style scoped>
.loading-tip {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.loading-text {
  margin-right: 4px;
  font-weight: 500;
}

.dots {
  display: flex;
  gap: 2px;
}

.dot {
  display: inline-block;
  font-size: 16px;
  animation: wave 1.4s ease-in-out infinite;
}

.dot-1 {
  animation-delay: 0s;
}

.dot-2 {
  animation-delay: 0.2s;
}

.dot-3 {
  animation-delay: 0.4s;
}

@keyframes wave {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* 可选的淡入效果 */
.loading-tip {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
</style>
